const extractTextWebpackPlugin=require('extract-text-webpack-plugin');

const ruse={//loader的配置
		rules:[
			{
				test:/\.css$/,
				// use:extractTextWebpackPlugin.extract({
				// 	fallback:'style-loader',
				// 	use:['css-loader','postcss-loader'],
				// 	publicPath:'../'
				// })
				// use:[{loader:'style-loader'},{loader:'css-loader'}]



				use:[{loader:'style-loader'},{loader:'css-loader'},{loader:'postcss-loader'}]
			},
			{
				test:/\.(jpg|png|gif|svg)$/,
				use:[{
					loader:'url-loader',
					options:{
						limit:60000,
						// outputPath:'image'
					}
				}]
			},
			{
				test:/\.less$/,
				use:[{loader:'style-loader'},{loader:'css-loader'},{loader:'less-loader'}]
			},
			{
				test:/\.(sass|scss)$/,
				use:['style-loader','css-loader','sass-loader']
			},
			{
				test:/\.vue$/,exclude: /node_modules/,use:[{loader:'vue-loader'}]//处理vue文件的loader
			},
			{
				test: /\.(eot|woff|ttf|svg)/,
				loader: 'file-loader?prefix=font/'
			},
			// {
			// 	test: /vue-preview.src.*?js$/,
			// 	loader:'babel-loader'
		
			// }
			// , {
			// 	test: /\.woff/,
			// 	loader: 'file-loader?prefix=font/&limit=10000&mimetype=application/font-woff'
			// }, {
			// 	test: /\.ttf/,
			// 	loader: 'file-loader?prefix=font/'
			// }, {
			// 	test: /\.svg/,
			// 	loader: 'file-loader?prefix=font/'
			// }
		]
	}
	module.exports=ruse